home *** CD-ROM | disk | FTP | other *** search
/ PC User 2002 April / Disc 2 / PCUSER0402D2.iso / software / utils / files / wincron.exe / data1.cab / Sample_Scripts / Config.tg < prev    next >
Encoding:
Text File  |  2001-10-20  |  4.6 KB  |  141 lines

  1. ##########################################################################
  2. ## CONFIG.TG
  3. # This autorun script is run automatically when WinCron is started.
  4. # Config.tg runs before all other scripts and is intended to 'set-up' the 
  5. # environment for other scripts.
  6. # See Also: AutoRun.tg
  7. # Auto loading scripts load in the following order:
  8. # Config.tg, (AutoRun.tg), (setup.tg), user.tg
  9. # Config.tg: This file unconditionally starts on WinCron boot
  10. # AutoRun.tg: This script will start IF WinCron is started as a service 
  11. # setup.tg: This script (if it exists) will run to finish WinCron installation  
  12. # user.tg: This is the user script and never over written by WinCron setup
  13. {
  14.     -name CONFIG.TG
  15.     -start 
  16.     -stop
  17.  
  18.     ###
  19.     # Establish the account name for when we are run as an application or
  20.     # run in the USERS account as a system service
  21.     # This is initially set by the SETUP program:
  22.     # HKEY_LOCAL_MACHINE\Software\Tomasello Software\WinCron\TG.ENVIRONMENT
  23.     #-action -set ACCOUNT_NAME=
  24.  
  25.     ###
  26.     # inform the user what accout we are runnng out of
  27.     -action -print Running as user '%ACCOUNT_NAME%' in account '%TG.ACCOUNT%'
  28.     
  29.     ###
  30.     # Name of the email profile to use
  31.     # This is initially set by the SETUP program:
  32.     # HKEY_LOCAL_MACHINE\Software\Tomasello Software\WinCron\TG.ENVIRONMENT
  33.     #-action -set EMAIL_PROFILE="Microsoft Outlook"
  34.  
  35.     ###
  36.     # inform the user what email profile we are using
  37.     -action -print Using email profile '%EMAIL_PROFILE%'
  38.  
  39.     ###
  40.     # Setup environment variables    
  41.     
  42.     # Setup the default location to find USER Scripts
  43.     -action -set TG.SCRIPT_DIR="%TG.ROOT_DIR%Scripts\"
  44.  
  45.     # Setup the default location to find USER Sample Scripts
  46.     -action -set TG.SAMPLE_SCRIPT_DIR="%TG.ROOT_DIR%Sample Scripts\"
  47.  
  48.     # Setup the default location to find USER Sample 'C' Scripts
  49.     -action -set TG.SAMPLE_CSCRIPT_DIR="%TG.ROOT_DIR%Sample Scripts\C\"
  50.  
  51.     # Setup the default location to find USER include files for the 'C' interpreter
  52.     -action -set TG.INCLUDE_DIR="%TG.ROOT_DIR%Sample Scripts\Include\"
  53.  
  54.     ###
  55.     # run a subroutine with the same name as that of the current account.
  56.     # this allows us to run differently depending on how we were loaded/run
  57.     -action -call "%TG.ACCOUNT%"
  58.  
  59.     ###
  60.     # Run common services
  61.  
  62.     # load the FTP service
  63.     # uncomment the next two lines if you wish the FTP service
  64.     #-action -load -internal "%TG.SCRIPT_DIR%"load_ftp_service.tg
  65.     #-action -call load_ftp_service
  66.     #-action -print ................
  67.  
  68.     # load the IMAGEING service
  69.     # uncomment the next two lines if you wish the IMAGEING service
  70.     #-action -load -internal "%TG.SCRIPT_DIR%"load_image_service.tg
  71.     #-action -call load_image_service
  72.     #-action -print ................
  73.  
  74.     # load the STRING service
  75.     # uncomment the next two lines if you wish the STRING service
  76.     -action -load -internal "%TG.SCRIPT_DIR%"load_string_service.tg
  77.     -action -call load_string_service
  78.     -action -print ................
  79.  
  80.     # load the C INTERPRETER service
  81.     # uncomment the next two lines if you wish the C INTERPRETER service
  82.     #-action -load -internal "%TG.SCRIPT_DIR%"load_cscript_service.tg
  83.     #-action -call load_cscript_service
  84.     #-action -print ................
  85.  
  86.     # load the SENDKEYS service
  87.     # uncomment the next two lines if you wish the SENDKEYS service
  88.     -action -load -internal "%TG.SCRIPT_DIR%"load_sendkeys_service.tg
  89.     -action -call load_sendkeys_service
  90.     -action -print ................
  91.  
  92.     ###
  93.     # done!
  94.     -action -print Config.tg: Environment setup complete.
  95. }
  96.  
  97. # when run as a system service in my account (PROXY)
  98. #    OR when run as application
  99. {
  100.     ###
  101.     # the subroutine will have *your* account name by setting the 
  102.     # environment variable ACCOUNT_NAME in Config.tg.
  103.     -name %ACCOUNT_NAME%
  104.  
  105.     ###
  106.     #load the MAIL service
  107.     -action -load -internal "%TG.SCRIPT_DIR%"load_mail_service.tg
  108.     -action -call load_mail_service
  109.     -action -print ................
  110.  
  111.     ###
  112.     # done!
  113.     -action -print -+-+-+-+-+-+-+-+
  114. }
  115.  
  116. # when run as a system service in LocalSystem account
  117. {
  118.     ###    
  119.     # account name when run in the LocalSystem account
  120.     -name SYSTEM
  121.  
  122.     ###
  123.     # MAPI mail won't run here in LocalSystem account.
  124.     #-action -load -internal "%TG.SCRIPT_DIR%"load_mail_service.tg
  125.     #-action -call load_mail_service
  126.     #-action -print ................
  127.  
  128.     ###
  129.     # Uncomment the next four lines if you want to use the proxy WinCron
  130.     # 
  131.     #-action -load -internal "%TG.SCRIPT_DIR%"proxy_initialize.tg
  132.     #-action -call proxy_initialize
  133.  
  134.     #-action -load -internal "%TG.SCRIPT_DIR%"proxy_connect.tg
  135.     #-action -call proxy_connect
  136.     #-action -print ................
  137.  
  138.     ###
  139.     # done!
  140.     -action -print -+-+-+-+-+-+-+-+
  141. }